﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CapaPresentacion.Converters
{
    class NullToNoInformadoConverter : System.Windows.Data.IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string stringValue = value as string;

            if (String.IsNullOrWhiteSpace(stringValue))
            {
                return "No Informado";
            }
            else
            {
                return stringValue;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string stringValue = value as string;

            return stringValue;
        }










    }
}

    